home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / daolibb / daolistc.h < prev    next >
C/C++ Source or Header  |  1999-04-12  |  2KB  |  74 lines

  1. #if !defined(AFX_DAOLISTCTRL_H__A7DB9677_6820_11D2_9149_E655B8000000__INCLUDED_)
  2. #define AFX_DAOLISTCTRL_H__A7DB9677_6820_11D2_9149_E655B8000000__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // DaoListCtrl.h : header file
  8. //
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CDaoListCtrl window
  12.  
  13. class CDaoListCtrl : public CListCtrl, public DaoRecordset
  14. {
  15.     CMenu ContextMenu;
  16.     short count;
  17.     LVITEM* item;
  18.     short* type;
  19.     int* lencol;
  20.     int* totcol;
  21.     int indcol;
  22. // Construction
  23. public:
  24.     CDaoListCtrl();
  25.     CDaoListCtrl(DaoRecordset& r);
  26.  
  27. // Attributes
  28. public:
  29.     void Init(DaoRecordset const & r);
  30.  
  31. // Operations
  32. public:
  33.  
  34. // Overrides
  35.     // ClassWizard generated virtual function overrides
  36.     //{{AFX_VIRTUAL(CDaoListCtrl)
  37.     protected:
  38.     virtual void PreSubclassWindow();
  39.     //}}AFX_VIRTUAL
  40.  
  41. // Implementation
  42. public:
  43.     void SetLenCol(int index, int len);
  44.     virtual ~CDaoListCtrl();
  45.     int Llenar();
  46.     void Linea(int index);
  47.     LPCSTR GetIndexText(int index);
  48.     int Update(int index);
  49.     CDaoListCtrl* operator&() {return this;}
  50.  
  51.     // Generated message map functions
  52. protected:
  53.     //{{AFX_MSG(CDaoListCtrl)
  54.     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  55.     afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  56.     //}}AFX_MSG
  57.     void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  58.  
  59. private:
  60.     void DrawItemText(CDC* pDC, char* text, CRect rect, int nWidth, int nFormat);
  61.     int GetSelIndexes(int* indexes, int maxCount) const;
  62.  
  63.     friend class CListDialog;
  64.  
  65.     DECLARE_MESSAGE_MAP()
  66. };
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69.  
  70. //{{AFX_INSERT_LOCATION}}
  71. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  72.  
  73. #endif // !defined(AFX_DAOLISTCTRL_H__A7DB9677_6820_11D2_9149_E655B8000000__INCLUDED_)
  74.